/*
 * Copyright (C) 2014 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

@import "base/variables";
@import "base/mixins/typography";
@import "vendor/bootstrap/variables";
@import "deprecated/bootstrap/mixins";
@import "vendor/bootstrap/grid";
@import "vendor/bootstrap/forms";
@import "vendor/bootstrap/tables";


// expanded checkbox label with hover
div.checkbox {
  padding: 12px;
  margin: 10px 0px;
  background: $grayLighter;
  border-radius: 5px;
  &:hover {
    background: $infoBackground;
  }
}

// section separators (screenreader doesn't like the hr tag)
.hr {
  margin: 10px;
  padding: 10px;
  border-bottom: 1px solid $grayLighter;
}

// bootstrap table overrides for pretty formatting
table.table {
  border: 1px solid darken($grayLighter, 10%);
  @include fontSize($ic-font-size--xsmall);

  th, td {
    padding: 12px;
    border: 1px solid darken($grayLighter, 10%);
  }
  th, td, tr {
    text-align: center;
  }
  th {
    background: $grayLighter;
    font-weight: 400;
  }

  // left align the first column for student info tables
  &.left-first {
    th:first-child, td:first-child {
      text-align: left;
    }
  }
}

// Force labels in dialogs to appear next to checkboxes
.ui-dialog {
  label {
    display: inline;
  }
}

// Force labels for dropdowns to align left on small screens
.text-right-responsive {
  text-align: right;
  @media screen and (max-width: 1143px) {
    text-align: left;
  }
}

// restrict textarea width
.custom-column-cell {
  textarea {
    max-width: 620px;
  }
}

// padding helper for vertical spacing
h3.assignment_selection { margin-bottom: 0px; }

ic-tab {
  padding: 6px 12px;
  margin: 2px;
  border-radius: 5px;
  &:hover, &:focus {
    background-color: $grayLighter;
  }
  &[selected] {
    background-color: $ic-link-color;
    color: $white;
  }
}

.hide-outcomes ic-tab-list {
  display: none;
}

.grading_value {
  text-align: center;
  width: 50px;
}

select.grading_box.pass_fail {
  width: inherit;
}

span.late-pill, span.missing-pill {
  padding-left: 12px;
  text-transform: uppercase;
}

.error {
  color: $ic-color-danger;
  border-color: $ic-color-danger;
}

.submission_late_penalty {
  color: $ic-color-danger;
  padding-left: 12px;
}

.submission_final_grade {
  padding-left: 12px;
}

// short-term hack until this version of srgb rides into the sunset
.pill-align {
  transform: translateY(6px);
}

.deduction-box {
  display: flex;
  .deduction-box-labels {
    margin-right: .5em;
  }
  .deduction-box-values {
    flex: 1
  }
}
